package example.auto;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Main {
    public static void main(String[] args) {
        ApplicationContext context=new  ClassPathXmlApplicationContext("annotation-config.xml");
        People zs=context.getBean("zs", People.class);
        System.out.println(zs);
        System.out.println("姓名"+zs.getName());
        System.out.println("手机"+zs.getPhone().getBrand());
        System.out.println("电脑"+zs.getPc().getBrand());


    }
}
